home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Software für Mac-OS X / Entwickler-Tools / netbeans / modules / ext / djava.jar / koala / dynamicjava / tree / Literal.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-03-14  |  1.6 KB  |  56 lines

  1. package koala.dynamicjava.tree;
  2.  
  3. import koala.dynamicjava.tree.visitor.Visitor;
  4.  
  5. public abstract class Literal extends PrimaryExpression {
  6.    public static final String REPRESENTATION = "representation";
  7.    public static final String VALUE = "value";
  8.    public static final String TYPE = "type";
  9.    private String representation;
  10.    private Object value;
  11.    private Class type;
  12.  
  13.    public String getRepresentation() {
  14.       return this.representation;
  15.    }
  16.  
  17.    public void setRepresentation(String var1) {
  18.       if (var1 == null) {
  19.          throw new IllegalArgumentException("s == null");
  20.       } else {
  21.          ((Node)this).firePropertyChange("representation", this.representation, this.representation = var1);
  22.       }
  23.    }
  24.  
  25.    public Object getValue() {
  26.       return this.value;
  27.    }
  28.  
  29.    public void setValue(Object var1) {
  30.       ((Node)this).firePropertyChange("value", this.value, this.value = var1);
  31.    }
  32.  
  33.    public Class getType() {
  34.       return this.type;
  35.    }
  36.  
  37.    public void setType(Class var1) {
  38.       ((Node)this).firePropertyChange("type", this.type, this.type = var1);
  39.    }
  40.  
  41.    public Object acceptVisitor(Visitor var1) {
  42.       return var1.visit(this);
  43.    }
  44.  
  45.    protected Literal(String var1, Object var2, Class var3, String var4, int var5, int var6, int var7, int var8) {
  46.       super(var4, var5, var6, var7, var8);
  47.       if (var1 == null) {
  48.          throw new IllegalArgumentException("rep == null");
  49.       } else {
  50.          this.representation = var1;
  51.          this.value = var2;
  52.          this.type = var3;
  53.       }
  54.    }
  55. }
  56.